package com.lyz.dataStructure.JianZhiOffer.listNode1;
/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/7/23 21:30
 *@Description:
 **/
public class ListNode {

    int val ;
    ListNode next  ;
    public ListNode(int val){
        this.val = val;
    }

    @Override
    public String toString(){
        if(this.next==null){
            return  String.valueOf(this.val);
        }
        return this.val+ "->"+ this.next.toString();
    }
}
